home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / perl / sprite / RCS / stat.pl,v < prev    next >
Encoding:
Text File  |  1991-11-14  |  1.4 KB  |  85 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.2
  10. date     91.11.14.10.00.11;  author jhh;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     91.08.13.22.08.59;  author jhh;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @added Sprite-specific stat fields
  27. @
  28. text
  29. @;# $Header: /sprite/src/cmds/perl/sprite/RCS/stat.pl,v 1.1 91/08/13 22:08:59 jhh Exp Locker: jhh $
  30.  
  31. ;# Usage:
  32. ;#    require 'stat.pl';
  33. ;#    @@ary = stat(foo);
  34. ;#    $st_dev = @@ary[$ST_DEV];
  35. ;#
  36. $ST_DEV =    0 + $[;
  37. $ST_INO =    1 + $[;
  38. $ST_MODE =    2 + $[;
  39. $ST_NLINK =    3 + $[;
  40. $ST_UID =    4 + $[;
  41. $ST_GID =    5 + $[;
  42. $ST_RDEV =    6 + $[;
  43. $ST_SIZE =    7 + $[;
  44. $ST_ATIME =    8 + $[;
  45. $ST_MTIME =    9 + $[;
  46. $ST_CTIME =    10 + $[;
  47. $ST_BLKSIZE =    11 + $[;
  48. $ST_BLOCKS =    12 + $[;
  49. #
  50. # These are unique to Sprite.
  51. #
  52. $ST_SERVERID =        13 + $[;
  53. $ST_VERSION =        14 + $[;
  54. $ST_USERTYPE =        15 + $[;
  55. $ST_DEVSERVERID =    16 + $[;
  56.  
  57. ;# Usage:
  58. ;#    require 'stat.pl';
  59. ;#    do Stat('foo');        # sets st_* as a side effect
  60. ;#
  61. sub Stat {
  62.     ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
  63.     $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks,
  64.     $st_serverID, $st_version, $st_userType, $st_devServerID) = 
  65.     stat(shift(@@_));
  66. }
  67.  
  68. 1;
  69. @
  70.  
  71.  
  72. 1.1
  73. log
  74. @Initial revision
  75. @
  76. text
  77. @d1 1
  78. a1 1
  79. ;# $Header: stat.pl,v 4.0 91/03/20 01:26:16 lwall Locked $
  80. d21 7
  81. d35 3
  82. a37 1
  83.     $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@@_));
  84. @
  85.